package com.luozy.common.feignConfig;

import com.luozy.common.feignInterceptor.MyFeignInterceptor;
import feign.Logger;
import feign.RequestInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

//配置bean
@Configuration
public class FeignConfig {

    //配置自定义feign拦截器为bean
    @Bean
    public RequestInterceptor requestInterceptor() {
        return new MyFeignInterceptor();
    }

    //配置feign日志级别
    @Bean
    public Logger.Level level() {
        return Logger.Level.BASIC;
    }
}
